package com.mooc.ad.web;

import com.mooc.ad.entity.Cart;
import com.mooc.ad.service.CartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lzq on 2019/3/14
 */
@RestController
@RequestMapping("/cart")
public class CartController {

    @Autowired
    private CartService cartService;

    @PostMapping("/add")
    public void addCart(@RequestBody Cart cart){
        cartService.addCart(cart);
        return;
    }


}
